# 代码5-15
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np


sns.set()
x = np.arange(1, 10, 2)
y1 = x + 1
y2 = x + 3
y3 = x + 5
def showLine(flip=1):
    sns.lineplot(x=x, y=y1)
    sns.lineplot(x=x, y=y2)
    sns.lineplot(x=x, y=y3)
# 恢复默认参数
pic = plt.figure(figsize=(8, 8), dpi=100)
with sns.plotting_context('paper'):  # 选择paper类型
    pic.add_subplot(2, 2, 1)
    showLine()
    plt.title('paper')
with sns.plotting_context('notebook'):  # 选择notebook类型
    pic.add_subplot(2, 2, 2)
    showLine()
    plt.title('notebook')
with sns.plotting_context('talk'):  # 选择talk类型
    pic.add_subplot(2, 2, 3)
    showLine()
    plt.title('talk')
with sns.plotting_context('poster'):  # 选择poster类型
    pic.add_subplot(2, 2, 4)
    showLine()
    plt.title('poster')
plt.show()
